package com.vunguyen.model;
// Generated Nov 29, 2014 7:36:58 AM by Hibernate Tools 3.6.0


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CongvandiKhoaPhongban generated by hbm2java
 */
@Entity
@Table(name="congvandi_khoa_phongban"
    ,catalog="qlkhoacntt"
)
public class CongvandiKhoaPhongban  implements java.io.Serializable {


     private CongvandiKhoaPhongbanId id;
     private Congvandi congvandi;
     private KhoaPhongban khoaPhongban;
     private Date ngayGui;

    public CongvandiKhoaPhongban() {
    }

    public CongvandiKhoaPhongban(CongvandiKhoaPhongbanId id, Congvandi congvandi, KhoaPhongban khoaPhongban, Date ngayGui) {
       this.id = id;
       this.congvandi = congvandi;
       this.khoaPhongban = khoaPhongban;
       this.ngayGui = ngayGui;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="idCongVanDi", column=@Column(name="idCongVanDi", nullable=false, length=20) ), 
        @AttributeOverride(name="idKhoaPhongBan", column=@Column(name="idKhoa_PhongBan", nullable=false, length=10) ) } )
    public CongvandiKhoaPhongbanId getId() {
        return this.id;
    }
    
    public void setId(CongvandiKhoaPhongbanId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idCongVanDi", nullable=false, insertable=false, updatable=false)
    public Congvandi getCongvandi() {
        return this.congvandi;
    }
    
    public void setCongvandi(Congvandi congvandi) {
        this.congvandi = congvandi;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idKhoa_PhongBan", nullable=false, insertable=false, updatable=false)
    public KhoaPhongban getKhoaPhongban() {
        return this.khoaPhongban;
    }
    
    public void setKhoaPhongban(KhoaPhongban khoaPhongban) {
        this.khoaPhongban = khoaPhongban;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="NgayGui", nullable=false, length=10)
    public Date getNgayGui() {
        return this.ngayGui;
    }
    
    public void setNgayGui(Date ngayGui) {
        this.ngayGui = ngayGui;
    }




}


